class point {

  constructor(options) {
    this._positions = options.positions
    this.options = {
      name: "控制点",
      id: options.id,
      point: {
        show: true,
        pixelSize: 20,
        color: Cesium.Color.RED.withAlpha(0.5),
        outlineColor: Cesium.Color.WHITE,
        outlineWidth: 2,
        // disableDepthTestDistance: 999999999.0,
        scaleByDistance: new Cesium.NearFarScalar(0, 1, 5e10, 1),
        translucencyByDistance: new Cesium.NearFarScalar(0, 1, 5e10, 1),
        distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0, 4.8e10),
      }
    };
    this._init()
  }

  get positions() {
    return this._positions
  }

  setPositions(pos) {
    this._positions = pos
  }

  _init(params) {
    var _self = this;
    var _update = function () {
      return _self.positions;
    };
    // 实时更新polyline.positions
    this.options.position = new Cesium.CallbackProperty(
      _update,
      false
    );
    this.entity = new Cesium.Entity(this.options)
  }

}

export { point }